<?php
namespace app\api\controller\v1;
use x\my\Captcha;
class Com extends Base
{
    //微信分享
    public function wxshare(){
        $d = $this->post;
        $rule = [
            'share_url'=>'require',
        ];
        $msg = [
        ];
        check($rule,$msg,$d);
        $app = m('weixin','c')->getApp(c("api.wx_gzh_config")['myb']);
        $app->jssdk->setUrl(urldecode($d['share_url']));
        $rs = $app->jssdk->buildConfig(array('onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'), false);
        suc($rs);
    }
}
